<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../js/vue.js"></script>
    <title>Document</title>
</head>
<body>
    <div id="app">
        <hellotom></hellotom>
        <hellojerry></hellojerry>
    </div>
</body>
<script>
/*   局部组件 */
var hellotom = {
    data:function(){
        return {
            msg:'TOM'
        }
    },
    template:`<h3>我是 {{msg}} </h3>`
};
var hellojerry = {
    data:function(){
        return {
            msg:'Jerry'
        }
    },
    template:`<h3>我是{{msg}}</h3>`
};


var vm = new Vue({
    el: "#app",
    data: {
        
    },
    components:{
        hellotom,hellojerry
    }
});

</script>
</html>